<?php
/**
 * @version SVN: $Id$
 * @package    fmcSeminaire
 * @subpackage Views
 * @author     EasyJoomla {@link http://www.easy-joomla.org Easy-Joomla.org}
 * @author     Ludovic Launer {@link }
 * @author     Created on 18-Nov-10
 * @license    GNU/GPL
 */
$document = &JFactory::getDocument();
$document->addScript('../includes/js/jquery/jquery.js' );
$document->addScript('../includes/js/jquery/jquery.selectboxes.js' );
//-- No direct access
defined('_JEXEC') or die('=;)');

JHTML::_('behavior.tooltip');
?>
<script type="text/javascript">

// ------------------------------------------------------------------------------------
$.noConflict();
jQuery(document).ready(function(){ 
// ------------------------------------------------------------------------------------ 

jQuery("#campagneId").ajaxAddOption("index.php?option=com_fmcseminaire&controller=analyse&task=gtCampagneListData",
									{},
									false,
									setSelectedOption
									);

jQuery("#campagneId").change(function() {
	var selectedValue = jQuery("#campagneId").selectedValues()[0];

	//alert(selectedValue);

	});
//------------------------------------------------------------------------------------ 
//alert('<?php echo $this->fmcSeminaire->campagneId;?>');


function setSelectedOption()
{
	jQuery("#campagneId").val('<?php echo $this->item->campagneId;?>');
}
//------------------------------------------------------------------------------------ 
});
</script>
<form action="index.php" method="post" name="adminForm" id="adminForm">
	<fieldset class="adminform">
	<legend><?php echo JText::_( 'Details' ); ?></legend>
	<table class="admintable">
		<tr>
			<td width="100" align="right" class="key">
				<label for="greeting">
					<?php echo JText::_('Campagne'); ?> :
				</label>
			</td>
			<td>
				<select id="campagneId" name="campagneId">
				</select>
			</td>
		</tr>
		<tr>
			<td width="100" align="right" class="key">
				<label for="greeting">
					<?php echo JText::_('Date debut'); ?> :
				</label>
			</td>
			<td>
			<!--  -->
				<input class="text_area" type="text" name="dateDebut" id="dateDebut" size="32" maxlength="250" value="<?php echo $this->item->dateDebut;?>" />
			
			 <!-- 
				<?php echo JHTML::calendar($this->item->dateDebut,'dateDebut','dateDebut','%Y-%m-%d', 'disabled'); ?>
			 -->
			</td>
		</tr>		<tr>
			<td width="100" align="right" class="key">
				<label for="greeting">
					<?php echo JText::_('Nb Jours'); ?> :
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="nbJours" id="nbJours" size="32" maxlength="250" value="<?php echo $this->item->nbJours;?>" />
			</td>
		</tr>	<?php 
 ?>
	</table>
	</fieldset>
		
		<?php ##ECR_VIEW2_TMPL1_OPTION3## ?>

	<input type="hidden" name="cid[]" value="<?php echo $this->item->dateId; ?>" />
	<input type="hidden" name="option" value="com_fmcSeminaire" />
	<input type="hidden" name="task" value="" />
	<input type="hidden" name="controller" value="lesdates" />
</form>
